1. Field of the Invention
The present invention relates to an image processing apparatus for expressing a model by a combination of unit graphics and generating pixels in a drawn object region of a screen coordinate system and a method of the same.
2. Description of the Related Art
Along with also the improvement of operating speeds and the strengthening of graphic drawing functions in recent computer systems, computer graphics (CG) technology for using computer resources to prepare and process graphics and images is currently the subject of active research and development efforts and is being put into practical use.
For example, in three-dimensional graphics, the optical phenomenon when a three-dimensional object is illuminated by a predetermined light source is expressed by a mathematical model and the surface of the object is given shading or lighting or given a pattern based on this model to thereby to generate a more realistic, three-dimensional-like two-dimensional high definition image.
Such computer graphics is being increasingly utilized in CAD/CAM in the development field of science, industry, manufacture, etc. and other various types of fields of application.
Three-dimensional graphics is generally comprised by a geometry sub-system positioned as the front end and a raster sub-system positioned as the back end.
The “geometry sub-system” is the step for performing geometric operation processing on a position, posture, etc. of a three-dimensional object displayed on a display screen.
In the geometry sub-system, the object is generally handled as an aggregate of a large number of polygons, and geometric operation processing such as coordinate conversion, clipping, and light source calculation are performed in units of polygons.
On the other hand, the “raster sub-system” is the step for painting each pixel constituting the object.
The rasterizing is realized by for example interpolating the image parameters of all pixels included inside a polygon on the basis of the image parameters found for the vertexes of the polygon.
The image parameters referred to here include color (drawn color) data expressed by a so-called RGB format or the like, a z-value expressing a distance in a depth direction, and so on.
Further, in recent high definition three-dimensional graphics processing, a fog (f)) for causing a perspective feeling, a texture (t) for expressing the feeling of the material and pattern of the object surface to impart realism, etc. are also included as image parameters.
Here, the processing for generating pixels inside a polygon from the vertex information of the polygon is executed by using a linear interpolation technique frequently referred to as a “digital differential analyzer” (DDA).
In the DDA process, the inclination of data to a side direction of the polygon is found from the vertex information, the data on the side is calculated by using this inclination, then the inclination of a raster scan direction (X-direction) is calculated, and the amount of change of the parameter found from this inclination is added to the parameter values of the start point of the scan so as to generate internal pixels.
The generated pixel data is subjected to various tests in the processing on the pixel level and the passing data is drawn in a memory module. This memory module is interleaved by a predetermined size, for example, 4×4 rectangular region units, by a processing circuit.
The data accessed in for example a 2×4 pixel region in the memory is stored in a region indicated by pages (rows) and blocks (columns) as shown in FIG. 1.
Each of the rows ROW0 to ROW7 is sectioned into four columns (blocks BK-A, BK-B, BK-C, BK-D) as shown in FIG. 1.
Access (writing and reading) is carried out in a region of a boundary of 8 pixels in the x-direction and an even number of boundaries in the y-direction.
Due to this, access spanning for example the rows ROW0 and ROW1 or the rows ROW4 and ROW5 is not performed and occurrence of so-called “page violation” is suppressed.
However, when using for example parallel processing, as shown in FIG. 1, to simultaneously draw two primitives (triangles) PM1 and PM2, the block BK-C of the row ROW6 and the block BK-C of the row ROW7 are in the same bank, so cannot be simultaneously activated.
Accordingly, in a conventional image processing apparatus, when performing parallel processing in units of primitives, there is frequently a penalty with respect to a page, so there was the disadvantage that the graphic could not be efficiently generated.